<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags" %>
   <!doctype html>
 <html lang="zh-CN">
 <head>
    <base href="<%=basePath%>">
   <meta charset="UTF-8">
   <link rel="stylesheet" href="css/common.css">
   <link rel="stylesheet" href="css/main.css">
   <script type="text/javascript" src="js/jquery.min.js"></script>
   <script type="text/javascript" src="js/colResizable-1.3.min.js"></script>
   <script type="text/javascript" src="js/common.js"></script>
    <script src="js/selectdata.js"></script>
   <script type="text/javascript">
      $(function(){  
        $(".list_table").colResizable({
          liveDrag:true,
          gripInnerHtml:"<div class='grip'></div>", 
          draggingClass:"dragging", 
          minWidth:30
        }); 
        
      }); 
   </script>
   <title>Document</title>
 </head>
 <body>
    <div id="search_bar" class="mt10">
       <div class="box">
          <div class="box_border">
            <div class="box_top"><b class="pl15">老师信息</b></div>
            <div class="box_center pt10 pb10">
              
            </div>
            <div class="box_bottom pb5 pt5 pr10" style="border-top:1px solid #dadada;">
            <form action="<%=path %>/admin/teacher_queryList.action?pageList.pageNo=1">
            
            
              <div class="search_bar_btn" style="text-align: center;"> 
                <p>
                 <select id="select" class="select"> 
                 <option value="">--选择--</option> 
                        <option value="pageList.stuName">按姓名查找</option> 
                        <option  value="pageList.academy">按学院查找</option> 
                        <option  value="pageList.gradeClass">按班级查找</option> 
                      </select> 
                       &nbsp;
              <input type="text"  id="selectInput" class="input-text lh25" size="10">&nbsp;
                
               <input type="submit" class="ext_btn ext_btn_success" value="查找">&nbsp;
              </p>
                <p></p>
              </div>
            </form>  
            </div>
          </div>
        </div>
    </div>
     <div id="table" class="mt10">
        <div class="box span10 oh">
          <table width="100%" border="0" cellpadding="0" cellspacing="0" class="list_table">
                <tr>
                 <th width="30">编号</th>
                   <th width="100">学院</th>
                   <th width="100">班别</th>
                   <th width="100">姓名</th>
                   <th width="100">性别</th>
                   <th width="100">岗位</th>
                   <th width="100">部门</th>
                    <th width="100">操作</th>
                    </tr>
           <s:iterator value="pageList.dataList" id="list">                  
                <tr class="tr">
                   <td><s:property value="#list.id"/> </td>
                   <td><s:property value="#list.academy"/></td>
                   <td><s:property value="#list.gradeClass"/></td>
                   <td><s:property value="#list.teachName"/></td>
                   <td>
                   <s:if test="#list.teachSex==0">男</s:if>
                   <s:if test="#list.teachSex==1">女</s:if>
                     </td>
                      <td><s:property value="#list.quarters"/></td>
                   <td><s:property value="#list.branch"/></td>
                    <td >
                 <input type="button" onclick="location.href='<%=path %>/admin/teacher_queryById.action?teacher.id=${list.id }'" class="ext_btn ext_btn_success" value="修改">
                 <input type="button" onclick="location.href='<%=path %>/admin/teacher_delete.action?teacher.id=${list.id }'" class="ext_btn ext_btn_error" value="删除">
                 </tr>
                 </s:iterator>  
              
              </table>
              <div class="page mt10" >
                <div class="pagination">
                  <ul>
                      <li class="first-child"><a href="<%=path %>/admin/teacher_queryList.action?pageList.pageNo=1">首页</a></li>
                      <li <s:if test="pageList.pageNo==1">class="disabled"</s:if>>
                      <a href="<%=path %>/admin/teacher_queryList.action?pageList.pageNo=
                      <s:if test="pageList.pageNo==1">${pageList.pageNo}</s:if>
                          <s:else>${pageList.pageCount-1}</s:else>">上一页</a></li>
                      
                      <li><a>${pageList.pageNo}/${pageList.pageCount}</a></li>
                      <li <s:if test="pageList.pageCount==pageList.pageNo">class="disabled"</s:if>>
                      <a href="<%=path %>/admin/teacher_queryList.action?pageList.pageNo=
                       <s:if test="pageList.pageCount==pageList.pageNo">${pageList.pageCount}</s:if>
                          <s:else>${pageList.pageCount+1}</s:else>">下一页</a></li>
                      <li class="last-child"><a href="<%=path %>/admin/teacher_queryList.action?pageList.pageNo=${pageList.pageCount}">末页</a></li>
                  </ul>
                </div>

              </div>
        </div>
     </div>
     <script type="text/javascript">
     $(function(){
    	 $("#select").change(function(){
    		 $("#selectInput").attr("name",jQuery("#select  option:selected").val());
    	 });
     });
     </script>
     
  
 </body>
 </html>
  